<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<link rel="stylesheet" type="text/css" media="screen" href="css/smoothness/jquery-ui-1.9.0.custom.css" />	<!-- jqueryUI CSS -->
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" />							<!-- jqGrid CSS -->
<link rel="stylesheet" type="text/css" media="screen" href="css/selfTemplate.css" />						<!-- 本專案自行定義 CSS -->

<script src="js/jquery-1.8.0.min.js" type="text/javascript"></script>										<!-- jQuery 核心 -->
<script src="js/grid.locale-tw.js" type="text/javascript"></script>											<!-- jqGrid 語系檔 -->
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>										<!-- jqGrid 核心 -->
<script src="js/jquery-ui-1.9.0.custom.min.js" type="text/javascript"></script>							<!-- jqueryUI 核心 -->
<script src="js/widgets.js" type="text/javascript"></script>												<!-- 本專案自行定義 JS -->
<script src="js/jquery.checkboxtree.min.js" type="text/javascript"></script>								<!-- CheckBox樹的 JS -->

<title>SVN測試 </title>

<script type="text/javascript">

		

$(document).ready(function() {
	$.post("QuerySVN",function(svnRep) {
		$.each(svnRep,function(i, res) {
			var home = res.home;
			home = home.replace( new RegExp ( "/" , "gm" ), "\\/");
			var id = res.id;
			id = id.replace( new RegExp ( "/" , "gm" ), "\\/");
			if (res.isDir) {		//目錄
				$("#"+home).append("<li><input type='checkbox' id='chk_"+id+"'><label>"+res.id+"</label><ul id='"+res.id+"'></ul>");
			} else {
				$("#"+home).append("<li><input type='checkbox' id='chk_"+id+"'><label>"+res.id+"</label><select id='sel_"+id+"'></select>");
				var ver = res.ver;
				for(i=ver;i>=1;i--) {
					var mmm="#sel_"+id; 
					$(mmm).append("<option>"+i+"</option>");
				}
			}
		});
	},"JSON");
	
	
	
	
	$('#root').checkboxTree();
});
</script>

</head>
<body>
<div id="funcDisplay">
測試SVN取檔
</div>

<br/>
<button type="button">提交</button>
<p>
<ul id="root"></ul>
</body>
</html>